import { createApp } from 'vue'
import App from './App.vue'

import Router from '../src/router'//引入路由 自动加载index.js
import './reset.css'//全局重置样式
import './common.css'//全局常用类样式

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'

import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
const pinia = createPinia()
pinia.use(piniaPersist)

const app = createApp(App);

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)//循环全局注册图标
}
app.use(Router).use(ElementPlus).use(pinia).mount('#app')
